/*
 * Copyright (c) 2018. czmc All Rights Reserved.
 * Author: czmc
 * Email: zxc6355533@163.com
 * Encoding: UTF-8
 */

package top.stime21.myneighbours.module.update

import top.stime21.framework.mvp.MvpContract
import top.stime21.framework.mvp.MvpView
import top.stime21.myneighbours.data.entity.AppInfo
import zlc.season.rxdownload.entity.DownloadStatus

/**
 * Author: czmc  Email: @tuwan21.com
 * Version:	1.0  Date:3/6/2018
 */

interface UpdateContract:MvpContract{

    interface View : MvpView{
        /**
         * 显示更新对话框
         */
         fun showUpdateDialog(info: AppInfo)

        /**
         * 下载进度更新
         */
         fun onDownloadProgress(progress: DownloadStatus, started: Boolean, done: Boolean)

        /**
         * 下载失败
         */
         fun onDownloadError()
    }

    interface Presenter : MvpContract.Presenter{
        fun checkUpdate()
        /**
         * 下载更新
         */
        fun downloadUpdate(info: AppInfo)

        /**
         * 取消下载更新
         */
        fun cancelDownloadUpdate(info: AppInfo)
    }

    interface Model:MvpContract.Model{
        fun checkUpdate()
    }



}